import Mock from './mock.angular';

Mock.mock('/api/v1/homePage/statistics1', 'get', {
  success: true,
  message: '',
  code: 200,
  data: [
    {
      name: '安全教育培训数量',
      sum: 11,
      incrNum: 22,
    }, {
      name: '安全技术交底数量',
      sum: 11,
      incrNum: 22,
    }, {
      name: '待处理问题数量',
      sum: 11,
      incrNum: 22,
    }, {
      name: '已超期问题数量',
      sum: 11,
      incrNum: 22,
    },
  ],
});

Mock.mock('/api/v1/homePage/patrolSituation', 'post', (({ data }) => {
  const respData = {
    success: true,
    message: '',
    code: 200,
    'rows|20-100': [
      {
        id: '@id',
        staff: {
          name: '@cname',
          post: '@word',
        },
        'total|1-100': 1,
      },
    ],
  };
  return Mock.mock(respData);
}));

Mock.mock('/api/v1/homePage/problem/query', 'post', (({ data }) => {
  const respData = {
    success: true,
    message: '',
    code: 200,
    'rows|20-30': [
      {
        id: '@id',
        name: '@cname',
        post: '@word',
        'total|1-100': 1,
      },
    ],
  };
  return Mock.mock(respData);
}));
